var blur = document.getElementById("blur")
      var radius = document.getElementById("radius")
      var source = new ol.source.Vector({})

      var point = new ol.Feature({
        geometry: new ol.geom.Point([120.3, 30.5]),
      })
      source.addFeatures([point])
      //创建一个Heatmap图层

      var vector = new ol.layer.Heatmap({
        //矢量数据源（读取本地的KML数据）
        source,
        //热点半径
        radius: parseInt(radius.value, 10),
        //模糊尺寸
        blur: parseInt(blur.value, 10),
      })
      //为矢量数据源添加addfeature事件监听
      vector.getSource().on("addfeature", function (event) {
        // 示例数据2012_Earthquakes_Mag5.kml，可从其地标名称提取地震信息
        //要素的名称属性
        var name = event.feature.get("name")
        //得到要素的地震震级属性（magnitude）
        var magnitude = parseFloat(name.substr(2))
        //设置要素的weight属性
        event.feature.set("weight", magnitude - 5)
      })

      //分别为另个参数设置控件（input）添加事件监听，动态设置热点图的参数
      radius.addEventListener("input", function () {
        //设置热点图层的热点半径
        vector.setRadius(parseInt(radius.value, 10))
      })
      blur.addEventListener("input", function () {
        //设置热点图层的模糊尺寸
        vector.setBlur(parseInt(blur.value, 10))
      })
      var map = new ol.Map({
        target: "map",
        layers: [gaodeVector, vector],
        view: new ol.View({
          projection: "EPSG:4326",
          center: [114.3, 30.5],
          zoom: 4,
        }),
      })